package BE;

import java.util.EventObject;

import lejos.pc.comm.NXTInfo;

/**
 * Custom java bean containing data for NXT connection events.
 * 
 * @author Danny Johansen, Didzis Petkus, Liviu Berheci.
 *
 */
public class NXTConnectionEvent extends EventObject {

	private static final long serialVersionUID = -4531094772585285013L;
	private NXTInfo[] _nxts;

	/**
	 * Constructor taking event data as parameters.
	 * 
	 * @param source - {@link Object} to store into this event.
	 * @param nxts - collection of {@link NXTInfo} objects
	 * to store into this event.
	 */
	public NXTConnectionEvent(Object source, NXTInfo[] nxts) {
		super(source);
		_nxts = nxts;
	}

	/**
	 * Returns a collection of device information stored in this event.
	 * 
	 * @return an array of {@link NXTInfo} objects.
	 */
	public NXTInfo[] getNXTs() {
		return _nxts;
	}

}
